<template>
    <div class="recommend">
      <div class="title">周末去哪儿</div>
      <ul>
        <li class="item" v-for="item of weekendList" :key="item.id">
          <div class="img_wrapper">
            <img :src="item.imgUrl" alt="">
          </div>
          <div class="item-text">
            <p class="item-name">{{item.title}}</p>
            <p class="item-desc">{{item.desc}}</p>
          </div>
        </li>
      </ul>
    </div>
</template>
<script>
export default {
  name: 'HomeRecommend',
  props: {
    weekendList: Array
  },
  data () {
    return {}
  }
}
</script>
<style scoped lang="stylus">
  @import "~styles/mixins.styl";
  .recommend
    background:#eee
  .title
    line-height: .6rem
    background: #eee
    margin-top: .1rem
    padding-left:.08rem
  .item
    background: #fff
    overflow: hidden
    margin-bottom:.08rem
    .img_wrapper
      height:0
      padding-bottom:33.4%
      overflow:hidden
      img
        width: 100%
    .item-text
      padding-left:.2rem
      .item-name
        line-height:.54rem
        font-size:.32rem
        ellipsis()
      .item-desc
        line-height:.4rem
        color:#ccc
        ellipsis()
</style>
